package com.zhuqieli.database_learn.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author yangshengs
 * @date 2023/8/31 8:22
 * @desciption:
 */
@Configuration
public class OSSConfig {


    //    @Value("${alibaba.oss.accessKeyId}")
    private String accessKeyId = "LTAI5tAsndHEZ6JEPx8T7zVs";
    //    @Value("${alibaba.oss.accessKeySecret}")
    private String accessKeySecret = "t8yN9c6bzsi2e1C5Re25qftM2A6nee";

    //    @Value("${alibaba.oss.endpoint}")
    private String endpoint = "oss-cn-chengdu.aliyuncs.com";

    public OSS ossClient() {
        return new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
    }

}
